package com.itheima.flowcontrol.homework;
import java.util.Scanner;

/**
 * 需求：让用户依次录入三个整数，求出三个数中最大值。并打印到控制台
 */
public class HomeWorkIf01 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请依次输入你要录入的三个整数");
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        System.out.println("三个数中的最大值为"+ test01(a,b,c));

    }

    public static int test01(int a,int b,int c) {
        int max = 0;
        if(a >= b && a >= c){
            max = a;
        }else if(a < b && c < b){
            max = b;
        }else if(c >= a && b <= c){
            max = c;
        }
        return max;
    }
}
